package com.wsleo.jblog.service.impl.article;

import java.util.List;

import org.apache.commons.lang.StringUtils;

import com.wsleo.jblog.model.article.ArticleCatalog;
import com.wsleo.jblog.service.article.ArticleCatalogService;

@SuppressWarnings("unchecked")
public class ArticleCatalogServiceImpl implements ArticleCatalogService {

	public ArticleCatalog getById(Long id) {
		return new ArticleCatalog().Get(id);
	}

	public List<ArticleCatalog> catalogs() {
		return (List<ArticleCatalog>)new ArticleCatalog().List(1, Integer.MAX_VALUE);
	}

	public int counts(String filter) {
		return StringUtils.isBlank(filter) ? 
				new ArticleCatalog().TotalCount() : 
					new ArticleCatalog().TotalCount(filter);
	}

	public void save(ArticleCatalog catalog) {
		// TODO Auto-generated method stub

	}

	public void deleteById() {
		// TODO Auto-generated method stub

	}

	public void update(ArticleCatalog catalog) {
		// TODO Auto-generated method stub

	}

}
